<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>查询商品</title>
    <!-- 引入 jquery -->
    <script src="/wbs20052/ajax/day02/jquery.min.js" ></script>
    <script>
        function getProduct() {
            var pid = document.getElementById("pid").value;
            $("#show").load("/wbs20052/ajax/day02/getProduct.php", {pid}, function (responseText, textStatus, XHR){
                responseText += "<p>测试</p>";
                console.log(responseText, textStatus, XHR);
                $("#show").append("<p>测试</p>");
            });
        }
    </script>
</head>
<body>
    <input type="text" id="pid" placeholder="请输入商品编号">
    <input type="button" value="查询" onclick="getProduct()" >
    <div>
        <h3>商品信息</h3>
        <div id="show"></div>
    </div>
</body>
</html>